package cn.fenqing.demo.demo.service;

import cn.fenqing.validation.annotation.ActivateValidation;
import cn.fenqing.validation.bean.group.Update;
import org.springframework.stereotype.Service;

import javax.validation.constraints.NotNull;

/**
 * @author fenqing
 * @version 0.0.1
 * @date 2021/7/7 18:36
 * @description 这个类没有继承接口，直接注入到spring容器
 */
@Service
@ActivateValidation(group = Update.class)
public class AccountService {

    public String save(@NotNull(groups = Update.class, message = "用户名不能为null") String username){
        return "ok";
    }

}
